/***********************************************************************
    filename:   DaterFrameWindowEffect.h
    created:    10/4/2012
    author:     4Ys

    purpose:    Defines class for DaterFrameWindowEffect objects in UI
*************************************************************************/
#ifndef _DaterFrameWindowEffect_h_
#define _DaterFrameWindowEffect_h_
#include "CEGUI.h"

class DaterFrameWindowEffect : public CEGUI::RenderEffect
{
	/* !
	\brief
		Dater Frame Window Effect.
	*/
public:
		/* !
		\brief
			Construct the sample of class GroupEditWindow.
		*/
    DaterFrameWindowEffect();

		/* !
		\brief
			Implement required functions from RenderEffect interface.
		*/
    int getPassCount() const;
	
    void performPreRenderFunctions(const int pass);
    void performPostRenderFunctions();
    bool realiseGeometry(CEGUI::RenderingWindow& window, CEGUI::GeometryBuffer& geometry);
    bool update(const float elapsed, CEGUI::RenderingWindow& window);

protected:
    static const float tess_x;
    static const float tess_y;
    // tess_x * tess_y * vertex_per_quad
    static const int buffsize = (8 * 8 * 6);

    bool initialised;

    float lastX, lastY;
    float dragX, dragY;
    float elasX, elasY;

    CEGUI::Vertex vb[buffsize];
};

#endif